﻿<%@ Page Title="Admin-Job post" Language="C#" MasterPageFile="~/Site.Master" AutoEventWireup="true" CodeBehind="RecruiterJobpost.aspx.cs" Inherits="iResume.RecruiterJobpost" %>
<asp:Content ID="Content1" ContentPlaceHolderID="HeadContent" runat="server">
    <style type="text/css">

        .style15
        {
            width: 107px;
            text-align: right;
        }
        .style7
        {
            text-align: left;
            width: 6px;
        }
        .style2
        {
            text-align: left;
            width: 432px;
        }
        .style13
        {
            font-size: medium;
        }
        .style4
        {
            text-align: left;
            width: 15px;
        }
        .style3
        {
            text-align: right;
        }
        .style6
        {
            font-family: "Century Gothic";
        }
        .style5
        {
            font-family: "Century Gothic";
        }
        .style17
        {
            text-align: left;
        }
        .style19
        {
            font-family: "Times New Roman", Times, serif;
            font-size: x-large;
            color: #0033CC;
        }
        .style8
        {
            text-align: right;
        }
        .style20
        {
            margin-left: 0px;
        }
    </style>
</asp:Content>
<asp:Content ID="Content2" ContentPlaceHolderID="MainContent" runat="server">
    <table style="width:100%;">
        <tr>
            <td class="style15" rowspan="6">
                <asp:Image ID="Image1" runat="server" Height="110px" Width="100px" 
                    style="text-align: center; margin-top: 0px" />
            </td>
            <td class="style7">
                &nbsp;</td>
            <td class="style2">
                <asp:Label ID="name" runat="server" 
                    style="font-size: x-large; font-weight: 700"></asp:Label>
&nbsp;<span class="style13">(Administrator)</span></td>
            <td class="style4" rowspan="6">
                &nbsp;</td>
            <td class="style3">
                &nbsp;</td>
        </tr>
        <tr>
            <td class="style7">
                &nbsp;</td>
            <td class="style2">
                <span class="style6">Lives in</span>
                <asp:Label ID="nation" runat="server" 
                    style="color: #3399FF; font-family: 'Century Gothic'"></asp:Label>
                , <span class="style6">Born on</span>
                <asp:Label ID="dob" runat="server" style="color: #3399FF"></asp:Label>
                ,<span class="style5"> </span><span class="style6">is a</span><span 
                    class="style5"> </span>
                <asp:Label ID="gender" runat="server" style="color: #3399FF"></asp:Label>
            </td>
            <td class="style3">
                &nbsp;</td>
        </tr>
        <tr>
            <td class="style7">
                &nbsp;</td>
            <td class="style2">
                <asp:Label ID="Label4" runat="server" Text="Address : " CssClass="style5"></asp:Label>
                <asp:Label ID="Address" runat="server" 
                    style="font-family: 'Century Gothic'; color: #3399FF;"></asp:Label>
                (<asp:Label ID="post" runat="server" 
                    style="font-family: 'Century Gothic'; color: #3399FF;"></asp:Label>
                )</td>
            <td class="style3">
                &nbsp;</td>
        </tr>
        <tr>
            <td class="style7">
                &nbsp;</td>
            <td class="style2">
                <asp:Label ID="con" runat="server" Text="Contact :"></asp:Label>
                &nbsp;<asp:Label ID="cont" runat="server" 
                    style="font-family: 'Century Gothic'; color: #3399FF;"></asp:Label>
                &nbsp;&nbsp;<asp:HyperLink ID="editinfo" runat="server" NavigateUrl="~/updateAdmin.aspx">Edit Info</asp:HyperLink>
                &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
            </td>
            <td class="style3">
                &nbsp;</td>
        </tr>
        <tr>
            <td class="style7">
                &nbsp;</td>
            <td class="style2">
                &nbsp;</td>
            <td class="style3">
                &nbsp;</td>
        </tr>
        <tr>
            <td class="style7">
                &nbsp;</td>
            <td class="style2">
                &nbsp;</td>
            <td class="style3">
&nbsp;<strong><asp:HyperLink ID="js" runat="server" CssClass="style18" 
                    NavigateUrl="~/LoginAdmin.aspx" 
                    style="text-decoration: none; font-size: medium; font-family: 'Century Gothic'">Job Seekers</asp:HyperLink>
&nbsp;</strong>| <strong>
                <asp:HyperLink ID="r" runat="server" CssClass="style18" 
                    NavigateUrl="~/Recruiteradmin.aspx" 
                    style="font-size: medium; text-decoration: none; font-family: 'Century Gothic'">Recruiter</asp:HyperLink>
&nbsp;</strong>|<strong>
                <asp:HyperLink ID="r0" runat="server" CssClass="style18" 
                    NavigateUrl="~/RecruiterJobpost.aspx" 
                    
                    style="font-size: medium; text-decoration: none; font-family: 'Century Gothic'">Job Post</asp:HyperLink>
&nbsp;</strong></td>
        </tr>
        <tr>
            <td class="menu" colspan="5">
                <hr />
            </td>
        </tr>
        <tr>
            <td class="style17" colspan="5">
&nbsp;
            <strong>
                <asp:Label ID="Label5" runat="server" CssClass="style19" Text="Job Post"></asp:Label>
                </strong>
            </td>
        </tr>
        <tr>
            <td class="menu" colspan="5" style="text-align: left">
                &nbsp;</td>
        </tr>
        <tr>
            <td class="style8" colspan="5">
                <asp:GridView ID="GridView2" runat="server" AutoGenerateColumns="False" 
                    BackColor="LightGoldenrodYellow" BorderColor="Tan" BorderWidth="1px" 
                    CellPadding="2" DataKeyNames="jobID,email" DataSourceID="SqlDataSource1" 
                    ForeColor="Black" GridLines="None" 
                    style="text-align: center; " 
                    onrowcommand="GridView2_RowCommand" AllowPaging="True" CssClass="style20">
                    <AlternatingRowStyle BackColor="PaleGoldenrod" />
                    <Columns>
                        <asp:CommandField ShowDeleteButton="True" ShowEditButton="True" 
                            ShowSelectButton="True" />
                        <asp:BoundField DataField="jobID" HeaderText="jobID" 
                            SortExpression="jobID" InsertVisible="False" ReadOnly="True" />
                        <asp:BoundField DataField="SalaryRange" HeaderText="SalaryRange" 
                            SortExpression="SalaryRange" />
                        <asp:BoundField DataField="JobPosition" HeaderText="JobPosition" 
                            SortExpression="JobPosition" />
                        <asp:BoundField DataField="category" HeaderText="category" 
                            SortExpression="category" />
                        <asp:BoundField DataField="VacancyAvailable" HeaderText="VacancyAvailable" 
                            SortExpression="VacancyAvailable" />
                        <asp:BoundField DataField="companyName" HeaderText="companyName" 
                            SortExpression="companyName" />
                        <asp:BoundField DataField="email" HeaderText="email" 
                            SortExpression="email" ReadOnly="True" />
                        <asp:BoundField DataField="personInCharge" HeaderText="personInCharge" 
                            SortExpression="personInCharge" />
                        <asp:BoundField DataField="contact" HeaderText="contact" 
                            SortExpression="contact" />
                    </Columns>
                    <FooterStyle BackColor="Tan" />
                    <HeaderStyle BackColor="Tan" Font-Bold="True" />
                    <PagerStyle BackColor="PaleGoldenrod" ForeColor="DarkSlateBlue" 
                        HorizontalAlign="Center" />
                    <SelectedRowStyle BackColor="DarkSlateBlue" ForeColor="GhostWhite" />
                    <SortedAscendingCellStyle BackColor="#FAFAE7" />
                    <SortedAscendingHeaderStyle BackColor="#DAC09E" />
                    <SortedDescendingCellStyle BackColor="#E1DB9C" />
                    <SortedDescendingHeaderStyle BackColor="#C2A47B" />
                </asp:GridView>
                <asp:SqlDataSource ID="SqlDataSource1" runat="server" 
                    ConflictDetection="CompareAllValues" 
                    ConnectionString="<%$ ConnectionStrings:iResumeConnectionString %>" 
                    DeleteCommand="DELETE FROM [Recruiter] WHERE [email] = @original_email AND (([companyName] = @original_companyName) OR ([companyName] IS NULL AND @original_companyName IS NULL)) AND (([personInCharge] = @original_personInCharge) OR ([personInCharge] IS NULL AND @original_personInCharge IS NULL)) AND (([contact] = @original_contact) OR ([contact] IS NULL AND @original_contact IS NULL)) AND (([department] = @original_department) OR ([department] IS NULL AND @original_department IS NULL))" 
                    InsertCommand="INSERT INTO [Recruiter] ([companyName], [personInCharge], [email], [contact], [department]) VALUES (@companyName, @personInCharge, @email, @contact, @department)" 
                    OldValuesParameterFormatString="original_{0}" 
                    SelectCommand="SELECT jp.jobID, jp.SalaryRange, jp.JobPosition, jp.category, jp.VacancyAvailable, r.companyName, r.email, r.personInCharge, r.contact FROM Recruiter AS r CROSS JOIN jobPosting AS jp" 
                    
                    
                    
                    UpdateCommand="UPDATE [Recruiter] SET [companyName] = @companyName, [personInCharge] = @personInCharge, [contact] = @contact, [department] = @department WHERE [email] = @original_email AND (([companyName] = @original_companyName) OR ([companyName] IS NULL AND @original_companyName IS NULL)) AND (([personInCharge] = @original_personInCharge) OR ([personInCharge] IS NULL AND @original_personInCharge IS NULL)) AND (([contact] = @original_contact) OR ([contact] IS NULL AND @original_contact IS NULL)) AND (([department] = @original_department) OR ([department] IS NULL AND @original_department IS NULL))">
                    <DeleteParameters>
                        <asp:Parameter Name="original_email" Type="String" />
                        <asp:Parameter Name="original_companyName" Type="String" />
                        <asp:Parameter Name="original_personInCharge" Type="String" />
                        <asp:Parameter Name="original_contact" Type="String" />
                        <asp:Parameter Name="original_department" Type="String" />
                    </DeleteParameters>
                    <InsertParameters>
                        <asp:Parameter Name="companyName" Type="String" />
                        <asp:Parameter Name="personInCharge" Type="String" />
                        <asp:Parameter Name="email" Type="String" />
                        <asp:Parameter Name="contact" Type="String" />
                        <asp:Parameter Name="department" Type="String" />
                    </InsertParameters>
                    <UpdateParameters>
                        <asp:Parameter Name="companyName" Type="String" />
                        <asp:Parameter Name="personInCharge" Type="String" />
                        <asp:Parameter Name="contact" Type="String" />
                        <asp:Parameter Name="department" Type="String" />
                        <asp:Parameter Name="original_email" Type="String" />
                        <asp:Parameter Name="original_companyName" Type="String" />
                        <asp:Parameter Name="original_personInCharge" Type="String" />
                        <asp:Parameter Name="original_contact" Type="String" />
                        <asp:Parameter Name="original_department" Type="String" />
                    </UpdateParameters>
                </asp:SqlDataSource>
            </td>
        </tr>
        <tr>
            <td class="style15">
                &nbsp;</td>
            <td class="style7">
                &nbsp;</td>
            <td class="style2">
                &nbsp;</td>
            <td class="style4">
                &nbsp;</td>
            <td class="style3">
                &nbsp;</td>
        </tr>
    </table>
</asp:Content>
